//GCJ-02 到 WGS-84 的转换
class CMapFix
{
public:
	// static CMapFix* getInstance()
	// {
	// 	if (m_pInstance == NULL)
	// 	{
	// 		m_pInstance = new CMapFix();
	// 	}
	// 	return m_pInstance;
	// }
//private:
	CMapFix();
private:
	double m_casm_f;
	double m_casm_rr;
	double m_casm_t1;
	double m_casm_t2;
	double m_casm_x1;
	double m_casm_x2;
	double m_casm_y1;
	double m_casm_y2;
	//static CMapFix* m_pInstance;
public:
	//纠偏计算
	//dSrcLat 纠偏之前的纬度，dSrcLong纠偏之前的经度
	//dDstLat 纠偏之后的纬度，dSrcLong纠偏之后的经度（这两个作为返回值使用）
	void GPSFix(double dSrcLat, double dSrcLong, double& dDstLat, double& dDstLong);
private:
	struct MapPoint
	{
		double dLatitude;
		double dLongitude;
	};
private:
	void IniCasm(double w_time, double w_lng, double w_lat);
	double random_yj();
	double Transform_jy5(double x, double xx);
	double Transform_jyj5(double x, double yy);
	double Transform_yj5(double x, double y);
	double Transform_yjy5(double x, double y);
	MapPoint* wgtochina_lb(int wg_flag, int wg_lng, int wg_lat, int wg_heit, int wg_week, int wg_time);
	double yj_sin2(double x);
};